﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using System.Globalization;
using System.Threading;
using System.Configuration;


namespace QLTC
{
    public partial class Main : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        frmQuanLyNguoiDung frmQuanLyNguoiDungObj;
        Danh_Muc.frmQuyenTruyCap frmQuyenTruyCapObj;

        public Main()
        {
            InitializeComponent();
            
        }
                
        private void Main_Load(object sender, EventArgs e)
        {
            DevExpress.Skins.SkinManager.EnableFormSkins();
            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.UserSkins.OfficeSkins.Register();
        }

        private void btQuanLyNguoiDung_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (frmQuanLyNguoiDungObj != null)
            {
                if (frmQuanLyNguoiDungObj.IsDisposed)
                {
                    frmQuanLyNguoiDungObj = new frmQuanLyNguoiDung();
                }
                else
                {
                    frmQuanLyNguoiDungObj.Activate();
                }
            }
            else
            {
                frmQuanLyNguoiDungObj = new frmQuanLyNguoiDung();
            }

            frmQuanLyNguoiDungObj.MdiParent = this;
            frmQuanLyNguoiDungObj.Show();
        }

        private void btQuyen_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (frmQuyenTruyCapObj != null)
            {
                if (frmQuyenTruyCapObj.IsDisposed)
                {
                    frmQuyenTruyCapObj = new Danh_Muc.frmQuyenTruyCap();
                }
                else
                {
                    frmQuyenTruyCapObj.Activate();
                }
            }
            else
            {
                frmQuyenTruyCapObj = new Danh_Muc.frmQuyenTruyCap();
            }

            frmQuyenTruyCapObj.MdiParent = this;
            frmQuyenTruyCapObj.Show();
        }

      

        
        
    }
}